#!/bin/bash 
function replace(){
	rep=$1
	if [ ! $rep ]; then
		echo '参数不对'
	else
	a=`uname  -a`
	root=$(cd `dirname $0`; pwd)
    mac="Darwin"
	if [[ $a =~ $mac ]];then
  		sed -i "" ${rep}  ${root}/gradle.properties
	else
   		sed -i  ${rep}  ${root}/gradle.properties
	fi
	fi
}

name=$1
type=$2
if [[ $name ]] ;then
sql="s#^"${name}"=.*#"${name}"="${type}"#g"
echo $sql
replace $sql
fi